<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:a="http://xmlns.jcp.org/jsf/passthrough">
    <h:head>

    </h:head>
    <h:body>
        <ui:composition template="/templates/template.xhtml">
            <ui:define name="headScripts">
                <title>Login Page</title>
            </ui:define>
            <ui:define name="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-4 col-sm-offset-1">
                            <div class="login-form"><!--login form-->
                                <h:form>
                                    <h2>欢迎来到小二淘！</h2>
                                    <h:messages id='messages'/>
                                    <h:outputLabel for="userName"
                                                   value="用户名: " />
                                    <h:inputText id='userName' 
                                                 a:placeholder="请输入您的用户名"
                                                 value='#{login.user.username}'/>
                                    <h:outputLabel for="password"
                                                   value="密码: "/>
                                    <h:inputSecret id="password" 
                                                   a:placeholder="请输入您的密码"
                                                   value="#{login.user.pass}"/>
                                    <p:commandButton
                                        value="现在出发"
                                        action="#{login.login()}"
                                        ajax="false"
                                        styleClass="btn btn-default"
                                        />
                                </h:form>
                            </div><!--/login form-->
                        </div>
                    </div>
                </div>
            </ui:define>
        </ui:composition>

    </h:body>
</html>

